package com.app.utils.impl.labour;

import com.app.utils.impl.IConsole;
import com.app.utils.impl.Strategy;
import com.zndroid.utils.XUtils;
import com.zndroid.utils.impl.ScreenUtil;

/**
 * Created by lzy on 2022/2/16.
 */
public class ScreenUtilStrategy extends Strategy {
    public ScreenUtilStrategy(IConsole iConsole) {
        super(iConsole);
    }

    @Override
    public void doing() {
        ScreenUtil util = XUtils.create().screenUtil();
        
        iConsole.console("dp2px(‘24dp’)", util.dp2px(XUtils.getContext(), 24) + "");
        iConsole.console("px2dp(‘24px’)", util.px2dp(XUtils.getContext(), 24) + "");
        iConsole.console("sp2px(‘24dp’)", util.sp2px(XUtils.getContext(), 24) + "");
        iConsole.console("getDensity", util.getDensity(XUtils.getContext()) + "");
        iConsole.console("getScreenHeight", util.getScreenHeight(XUtils.getContext()) + "");
        iConsole.console("getScreenWidth", util.getScreenWidth(XUtils.getContext()) + "");
        iConsole.console("getActionBarHeight", util.getActionBarHeight(XUtils.getContext()) + "");
        iConsole.console("getStatusBarHeight", util.getStatusBarHeight(XUtils.getContext()) + "");
        iConsole.console("isSupportStatusBarDarkFont", util.isSupportStatusBarDarkFont() + "");
        iConsole.console("getScreenBrightness", util.getScreenBrightness(XUtils.getContext()) + "");
        iConsole.console("getScreenDormantTime", util.getScreenDormantTime(XUtils.getContext()) + "");

        iConsole.console("StatusBar", "状态栏相关请点击主界面【状态栏功能】按钮");
    }
}
